objs = base/start.o
objs += base/led.o 
objs += base/uart.o 
objs += base/init.o 
objs += base/nand_flash.o 
objs += base/main.o 
objs += base/exception.o 
objs += base/interrupt.o 
objs += base/timer.o 
objs += base/nor_flash.o 
objs += base/my_printf.o 
objs += base/string_utils.o 
objs += base/lib1funcs.o

objs += lcd/lcd_controller.o
objs += lcd/font.o
objs += lcd/framebuffer.o
objs += lcd/geometry.o
objs += lcd/lcd.o
objs += lcd/lcd_4.3.o
objs += lcd/lcd_test.o
objs += lcd/s3c2440_lcd_controller.o
objs += lcd/font_8x16.o

objs += adc_tsc/adc.o
objs += adc_tsc/adc_test.o

all:$(objs)
	#arm-linux-ld -Ttext 0 -Tdata 0x30000000  start.o led.o uart.o init.o main.o -o sdram.elf
	arm-linux-ld -T base/sdram.lds $^ libgcc.a -o base/sdram.elf
	arm-linux-objcopy -O binary -S base/sdram.elf adcscn.bin
	arm-linux-objdump -D base/sdram.elf > sdram.dis
clean:
	rm *.bin *.o *.elf *.dis base/*.o
	
%.o : %.c
	arm-linux-gcc -march=armv4 -c -o $@ $<

%.o : %.S
	arm-linux-gcc -march=armv4 -c -o $@ $<
	
